package com.ruoyi.system.domain;

import cn.wildfirechat.pojos.PojoGroupMember;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * max group member count对象 t_group
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Data
public class TGroup extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 群组id */
    @Excel(name = "群组id")
    private String gid;

    /** 群名称 */
    @Excel(name = "群名称")
    private String name;

    /** 群头像url */
    @Excel(name = "群头像url")
    private String portrait;

    /** 群组用户id */
    @Excel(name = "群组用户id")
    private String owner;

    /** 群类型 0普通 1 企业 */
    @Excel(name = "群类型 0普通 1 企业")
    private Long type;

    /** 扩展字段（json） */
    @Excel(name = "扩展字段", readConverterExp = "j=son")
    private String extra;

    /** 更新时间戳 */
    @Excel(name = "更新时间戳")
    private Long dt;

    /** 成员数量 */
    @Excel(name = "成员数量")
    private Long memberCount;

    /** 成员列表 */
    @Excel(name = "成员列表")
    private List<PojoGroupMember> memberList;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long memberDt;

    /** 全员禁言开关 */
    @Excel(name = "全员禁言开关")
    private Long mute;

    @Excel(name = "创建时间", readConverterExp = "0=正常,1=删除")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate createtime;

    /** 加群权限 */
    @Excel(name = "加群权限")
    private Long joinType;

    /** 是否禁止群内私聊 */
    @Excel(name = "是否禁止群内私聊")
    private Long privateChat;

    /** 搜索 */
    @Excel(name = "搜索")
    private Long searchable;

    /** 历史会议 */
    @Excel(name = "历史会议")
    private Long historyMessage;

    /** 是否禁止群内私聊 */
    @Excel(name = "是否禁止群内私聊")
    private Long maxMemberCount;

    /** 超级群组 */
    @Excel(name = "超级群组")
    private Long superGroup;

    /** 删除标记（0正常 1删除） */
    @Excel(name = "删除标记", readConverterExp = "0=正常,1=删除")
    private Long deleted;

    @Excel(name = "注册时间", readConverterExp = "0=正常,1=删除")
    private String regTime;
    // 0 添加 1 删除
    private Integer addOrDel;

}
